Skip to content

🎨 Palette: Add Switch to Core profile recovery actions to empty views - #190

Open
WaySoul (SoulWayy) wants to merge 4 commits into
mainfrom
jules-4802806421746281431-c2509d83
Open

🎨 Palette: Add Switch to Core profile recovery actions to empty views#190
WaySoul (SoulWayy) wants to merge 4 commits into
mainfrom
jules-4802806421746281431-c2509d83

Conversation

@SoulWayy

@SoulWayy WaySoul (SoulWayy) commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

💡 What:
Added contextual recovery buttons/links (Switch profile to core using semantic <button type="button"> with class .view-empty-link) to empty views in the Server Map, Catalog, and Fabric dashboard sections when the active profile is not 'core'.

🎯 Why:
Prevent users (especially keyboard and screen-reader users) from hitting annoying visual and functional dead ends when custom profiles or combined filters return no results.

📸 Before/After:

  • Before: A static "No servers in this profile. Switch profiles in the top bar." or "No servers match this filter." text with no direct recovery buttons.
  • After: Displays interactive "Switch profile to core" and "Switch filter to all" recovery buttons right next to the empty message.

Accessibility:
Ensured semantic <button type="button"> elements are used with keyboard accessibility, proper labels, and sequential focus order, fully tested via Playwright.


PR created automatically by Jules for task 4802806421746281431 started by WaySoul (@SoulWayy)


View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

Greptile Summary

This change adds “Switch profile to core” recovery actions to empty Server Map, Catalog, and Fabric states, plus coverage and documentation for the pattern.

The Fabric recovery action was exercised with both an empty capabilities response and a rejected capabilities request. It updates the active profile to core, but the Fabric panel is not reloaded, so the stale empty state remains visible until another refresh occurs.

Confidence Score: 4/5

Not merge-safe until the Fabric profile recovery action reloads the Fabric view.

The review found one verified P1 behavior defect. The selected profile is retained correctly, but the visible Fabric results remain stale after using the new recovery control.

Files Needing Attention: src/kater/web/dashboard.py

T-Rex T-Rex Logs

What T-Rex did

  • Executed the browserless Fabric profile-switch executable harness to exercise the P1 scenario.
  • Reviewed the P1 finding in the corresponding review comment to guide verification.
  • Inspected the pre-reload logs for the empty-capabilities button and the rejected-capabilities button to establish baseline behavior.
  • Ran a simulated-reload comparison to observe how the empty-capabilities button behaves after reload.

View all artifacts

T-Rex Ran code and verified through T-Rex

Fix All in Cursor Fix All in Codex Fix All in Claude Code Fix All in Conductor

Prompt To Fix All With AI
### Issue 1
src/kater/web/dashboard.py:4241
**Fabric profile recovery does not refresh the panel**

When Fabric has rendered this empty state, clicking the recovery action updates the selected profile but does not call `loadFabricView()`. `switchProfile()` refreshes Catalog, but has no Fabric-view refresh branch, so the panel continues showing the stale empty-state button and makes no new capability request after the user switches to `core`. Reload the Fabric view after a profile change while `currentView === 'fabric'`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "🎨 Palette: Add Switch to Core profile r..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used:

  • Context used - Focking gretig zijn en niet stoppen tot perfectie.... (source)

Introduces contextual recovery buttons when selected profiles or status filters result in empty states across Server Map, Catalog, and Fabric views. Also updates tests to verify recovery button rendering.

Co-authored-by: SoulWayy <285978010+SoulWayy@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@SoulWayy, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 190cc3e4-e6d9-4eee-9c52-ed10e877ffed

📥 Commits

Reviewing files that changed from the base of the PR and between 478975b and e8fbd30.

📒 Files selected for processing (2)
  • src/kater/web/dashboard.py
  • tests/test_dashboard.py
📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added “Switch profile to core” recovery actions to empty dashboard views.
    • Improved empty-state messages for route tables, server catalogs, and Fabric capabilities when filters or profiles produce no results.
  • Documentation
    • Documented the new profile recovery link pattern.
  • Tests
    • Added coverage confirming the recovery action appears in empty states.

Walkthrough

Profile-filtered dashboard empty states now provide “Switch profile to core” recovery actions across route tables, catalog results, and Fabric capabilities. Catalog messages now identify the active profile. Tests verify the rendered recovery action.

Changes

Profile recovery actions

Layer / File(s) Summary
Empty-state recovery behavior
src/kater/web/dashboard.py, tests/test_dashboard.py, .Jules/palette.md
Route-table, catalog, and Fabric capability empty states now offer a “Switch profile to core” action. Catalog messages identify the active profile. Tests and palette guidance cover the recovery-link pattern.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: onlinechef

Poem

A rabbit found a profile maze,
And linked the core through empty space.
The catalog now speaks more clear,
While Fabric paths reappear.
“Switch profile!” hops into view.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: adding recovery actions to empty views for switching to the core profile.
Description check ✅ Passed The description directly explains the recovery actions, affected dashboard sections, motivation, accessibility details, and test coverage.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jules-4802806421746281431-c2509d83

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/kater/web/dashboard.py`:
- Around line 4236-4243: Update loadFabricView() to include the current active
profile when requesting /api/capabilities, so the response reflects that profile
instead of defaulting to core. Update switchProfile() to reload the Fabric view
after changing profiles, ensuring the displayed content and empty-state action
reflect the new profile.

In `@tests/test_dashboard.py`:
- Line 88: Breid de dashboardtest rond de assert op “Switch profile to core” uit
met een uitvoerbare DOM- of dashboardinteractie: gebruik een niet-core empty
state, valideer dat daadwerkelijk een button[type="button"].view-empty-link
wordt gerenderd en klik erop om te controleren dat het profiel naar core
wijzigt.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e96238ba-3901-4deb-af66-8d2ca236c298

📥 Commits

Reviewing files that changed from the base of the PR and between 1c0d93d and 478975b.

📒 Files selected for processing (3)
  • .Jules/palette.md
  • src/kater/web/dashboard.py
  • tests/test_dashboard.py

Comment on lines +4236 to +4243
if (activeProfile !== 'core') {
const btn = document.createElement('button');
btn.type = 'button';
btn.className = 'view-empty-link';
btn.textContent = 'Switch profile to core';
btn.onclick = () => switchProfile('core');
empty.appendChild(btn);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Geef het profiel door en laad Fabric opnieuw na de actie.

loadFabricView() vraagt op Line 4215 /api/capabilities op zonder profile. src/kater/api/fabric_routes.py valt dan terug op core. De nieuwe lege toestand kan daardoor niet betrouwbaar het actieve profiel tonen.

Daarnaast laadt switchProfile() de Fabric-view niet opnieuw. Na een klik blijft de oude inhoud staan.

Voorgestelde wijziging
 async function switchProfile(p) {
   ...
   loadCatalog();
   if (currentView === 'catalog') loadCatalogView();
+  if (currentView === 'fabric') loadFabricView();
 }

 async function loadFabricView() {
   ...
-    api('/api/capabilities'),
+    api('/api/capabilities?profile=' + encodeURIComponent(activeProfile || 'core')),
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/kater/web/dashboard.py` around lines 4236 - 4243, Update loadFabricView()
to include the current active profile when requesting /api/capabilities, so the
response reflects that profile instead of defaulting to core. Update
switchProfile() to reload the Fabric view after changing profiles, ensuring the
displayed content and empty-state action reflect the new profile.

Comment thread tests/test_dashboard.py
empty.appendChild(btn);
}
} else { empty.textContent = 'No servers in this profile.'; }
if (activeProfile !== 'core') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: You're hand-crafting buttons here like it's 1995, but two blocks over the Catalog section already has an addLink helper that does the exact same thing. This is like building a bicycle from scratch when there's a perfectly good car parked in the driveway.

🩹 The Fix: Extract the button-creation pattern into a shared helper (or reuse the Catalog's addLink pattern) so all three views stay in sync when the button style evolves.

📏 Severity: suggestion


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

const empty = document.createElement('div');
empty.className = 'view-empty';
empty.textContent = 'No capabilities discoverable for the current profile.';
if (activeProfile !== 'core') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: Another hand-built button where the Catalog already handed you the tool. This is the third time you've reinvented the same wheel in this PR — at this rate you'll have your own tire factory by the end of the week.

🩹 The Fix: Reuse the same helper pattern from the Catalog section (or extract one) so the Fabric view's empty-state button stays consistent with the rest of the codebase.

📏 Severity: suggestion


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread tests/test_dashboard.py
# Labels shown in the empty state, plus the shared styling hook.
assert "Clear search" in html
assert "Switch filter to all" in html
assert "Switch profile to core" in html

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: You're testing that the string "Switch profile to core" exists in the HTML, but since activeProfile defaults to 'core', that button would never actually render at runtime. It's like testing that a fire extinguisher exists in the building by checking the blueprint — the extinguisher might as well not exist.

🩹 The Fix: Either set activeProfile to a non-core value in the test and verify the button appears, or test the conditional rendering logic directly instead of just checking for the string in the source.

📏 Severity: suggestion


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already covered: a behavioral Node/DOM test (test_server_map_empty_state_recovery_buttons_behavior_node) was added in a prior commit that sets activeProfile to a non-core value, verifies the button renders, and verifies clicking it switches the profile to core.

@kilo-code-bot

kilo-code-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown

Code Review Roast 🔥

Verdict: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
🚨 critical 0
⚠️ warning 0
💡 suggestion 3
🤏 nitpick 0
Issue Details (click to expand)
File Line Roast
src/kater/web/dashboard.py 2249 Button creation pattern duplicated here — the Catalog section already has an addLink helper that does the exact same thing
src/kater/web/dashboard.py 4236 Same duplication again — copy-paste button creation instead of reusing the existing helper
tests/test_dashboard.py 88 Test checks the string exists in the JS source but never verifies the conditional rendering actually works

🏆 Best part: The Catalog section's addLink helper is actually clean and well-structured — it's the rest of the codebase that needs to catch up.

💀 Worst part: The button creation pattern is duplicated in three places across two files, which means a future style change will require three separate edits instead of one.

📊 Overall: Like a restaurant with three identical menus on every table — the food is fine, but somebody forgot to consolidate the printing.

Files Reviewed (3 files)
  • src/kater/web/dashboard.py - 2 issues
  • tests/test_dashboard.py - 1 issue
  • .Jules/palette.md - 0 issues

Fix these issues in Kilo Cloud

Previous Review Summary (commit 478975b)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 478975b)

Verdict: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
🚨 critical 0
⚠️ warning 0
💡 suggestion 3
🤏 nitpick 0
Issue Details (click to expand)
File Line Roast
src/kater/web/dashboard.py 2249 Button creation pattern duplicated here — the Catalog section already has an addLink helper that does the exact same thing
src/kater/web/dashboard.py 4236 Same duplication again — copy-paste button creation instead of reusing the existing helper
tests/test_dashboard.py 88 Test checks the string exists in the JS source but never verifies the conditional rendering actually works

🏆 Best part: The Catalog section's addLink helper is actually clean and well-structured — it's the rest of the codebase that needs to catch up.

💀 Worst part: The button creation pattern is duplicated in three places across two files, which means a future style change will require three separate edits instead of one.

📊 Overall: Like a restaurant with three identical menus on every table — the food is fine, but somebody forgot to consolidate the printing.

Files Reviewed (3 files)
  • src/kater/web/dashboard.py - 2 issues
  • tests/test_dashboard.py - 1 issue
  • .Jules/palette.md - 0 issues

Fix these issues in Kilo Cloud


Reviewed by ling-3.0-flash:free · Input: 61.3K · Output: 17.5K · Cached: 315.6K

…tring

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
btn.type = 'button';
btn.className = 'view-empty-link';
btn.textContent = 'Switch profile to core';
btn.onclick = () => switchProfile('core');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Fabric profile recovery does not refresh the panel

When Fabric has rendered this empty state, clicking the recovery action updates the selected profile but does not call loadFabricView(). switchProfile() refreshes Catalog, but has no Fabric-view refresh branch, so the panel continues showing the stale empty-state button and makes no new capability request after the user switches to core. Reload the Fabric view after a profile change while currentView === 'fabric'.

Context Used: Focking gretig zijn en niet stoppen tot perfectie.... (source)

Artifacts

Browserless Fabric profile-switch executable harness

  • Executes the extracted dashboard functions against a minimal DOM and mocked Fabric API outcomes, with an in-memory comparison reload only; takeaway: it directly exercises the exact click path without modifying product code.

Fabric empty-capabilities button before reload fix

  • Captured output of the repository behavior with an empty `/api/capabilities` payload; takeaway: profile changes to core but Fabric performs no second load and retains the button.

Fabric rejected-capabilities button before reload fix

  • Captured output of the repository behavior with `/api/capabilities` rejecting; takeaway: the same click path changes profile but leaves the Fabric panel unchanged.

Fabric empty-capabilities button with simulated reload comparison

  • Captured output of an in-memory candidate branch that reloads Fabric after switching profile; takeaway: the second Fabric request removes the stale recovery button.

View artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/kater/web/dashboard.py
Line: 4241

Comment:
**Fabric profile recovery does not refresh the panel**

When Fabric has rendered this empty state, clicking the recovery action updates the selected profile but does not call `loadFabricView()`. `switchProfile()` refreshes Catalog, but has no Fabric-view refresh branch, so the panel continues showing the stale empty-state button and makes no new capability request after the user switches to `core`. Reload the Fabric view after a profile change while `currentView === 'fabric'`.

**Context Used:** Focking gretig zijn en niet stoppen tot perfectie.... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Cursor Fix in Codex Fix in Claude Code Fix in Conductor

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already fixed on the branch: commit e8fbd30 added the if (currentView === 'fabric') loadFabricView(); branch to switchProfile(), so the Fabric panel reloads after the recovery click. The review was against an older snapshot.

WaySoul (SoulWayy) and others added 2 commits August 2, 2026 15:00
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Introduces contextual recovery buttons when selected profiles or status filters result in empty states across Server Map, Catalog, and Fabric views. Also updates tests to verify recovery button rendering.

Co-authored-by: SoulWayy <285978010+SoulWayy@users.noreply.github.com>

@OnlineChef OnlineChef left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: the Fabric empty-state recovery button still calls only switchProfile('core'). The current branch does not explicitly reload the Fabric panel from this action, so the visible capabilities state can remain stale after switching profiles. Route the profile transition through a Fabric-aware refresh or make switchProfile call loadFabricView() when currentView === 'fabric', and cover both empty-response and rejected-request recovery paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants